package interview.thread;

import java.util.concurrent.Callable;

/**
 * @Author: cctv
 * @Date: 2019/5/17 10:59
 */
public class MyCallable implements Callable {
    private int number;

    public MyCallable(int number) {
        this.number = number;
    }

    @Override
    public Object call() throws Exception {
        Thread.sleep(1000);
        System.out.println(Thread.currentThread().getName());
        return Math.pow(number,2);
    }
}
